﻿package Message.Public
{
    import Framework.MQ.*;
    import Framework.Serialize.*;

    public class SGroupOper extends IMessageBase
    {
        public var type:int;
        public var fromEntityId:SEntityId;
        public var toEntityId:SEntityId;
        public var fromPlayer:SPublicPlayer;
        public var uid:String;
        public var groupName:String;
        public var memberNum:int;
        public var combat:int;
        public var password:String;
        public var copyCode:int;
        public var copyNum:int;
        public var forceCross:Boolean;
        public const _type:int = 4002;
        public static var _regist:SGroupOper = new SGroupOper(true);

        public function SGroupOper(param1:Boolean = false)
        {
            if (param1)
            {
                MessageManager.instance().regist(this);
            }
            return;
        }// end function

        override public function getType() : int
        {
            return this._type;
        }// end function

        override public function clone() : IMessageBase
        {
            return new SGroupOper();
        }// end function

        override public function __write(param1:SerializeStream) : void
        {
            param1.writeInt(this.type);
            this.fromEntityId.__write(param1);
            this.toEntityId.__write(param1);
            this.fromPlayer.__write(param1);
            param1.writeString(this.uid);
            param1.writeString(this.groupName);
            param1.writeInt(this.memberNum);
            param1.writeInt(this.combat);
            param1.writeString(this.password);
            param1.writeInt(this.copyCode);
            param1.writeInt(this.copyNum);
            param1.writeBool(this.forceCross);
            return;
        }// end function

        override public function __read(param1:SerializeStream) : void
        {
            this.type = param1.readInt();
            this.fromEntityId = new SEntityId();
            this.fromEntityId.__read(param1);
            this.toEntityId = new SEntityId();
            this.toEntityId.__read(param1);
            this.fromPlayer = new SPublicPlayer();
            this.fromPlayer.__read(param1);
            this.uid = param1.readString();
            this.groupName = param1.readString();
            this.memberNum = param1.readInt();
            this.combat = param1.readInt();
            this.password = param1.readString();
            this.copyCode = param1.readInt();
            this.copyNum = param1.readInt();
            this.forceCross = param1.readBool();
            return;
        }// end function

    }
}
